/*
 * author      : 吴中勤 
 * date        : 2018/9/4
 * description : 所有订阅的事件列表
 */

package com.deepexi.adapter.mq;

public enum TopicEnum {

    // 主流程
          MOBY_DEPOSIT_PAID_ONCE("MOBY_DEPOSIT_PAID_ONCE",       "订金支付"),
            MOBY_DEPOSIT_CONVERT("MOBY_DEPOSIT_CONVERT",         "订转定"),
          MOBY_MAKE_LOAN_SUCCESS("MOBY_MAKE_LOAN_SUCCESS",       "金融方案确定"),
    MOBY_UPLOAD_INSURANCE_POLICY("MOBY_UPLOAD_INSURANCE_POLICY", "保险方案确定"),
            MOBY_BOUTIQUE_CHANGE("MOBY_BOUTIQUE_CHANGE",         "精品变更"),
             MOBY_CONSULT_CHANGE("MOBY_CONSULT_CHANGE",          "更改顾问"),
       MOBY_VEHICLE_LOCK_SUCCESS("MOBY_VEHICLE_LOCK_SUCCESS",    "锁车成功"),
          DOWN_PAYMENT_PAID_ONCE("DOWN_PAYMENT_PAID_ONCE",       "一笔首付"),
              MOBY_ORDER_BILLING("MOBY_ORDER_BILLING",           "结算通知单"),
         FINAL_PAYMENT_PAID_ONCE("FINAL_PAYMENT_PAID_ONCE",      "一笔尾款"),
               MOBY_PROVIDE_GIFT("MOBY_PROVIDE_GIFT",            "提供赠品"),   //含精品/保养

    // 目前用不到的流程
          MOBY_STOCK_OUT_VEHICLE("MOBY_STOCK_OUT_VEHICLE",       "车辆出库"),
         MOBY_STOCK_OUT_BOUTIQUE("MOBY_STOCK_OUT_BOUTIQUE",      "精品出库"),

    // 分支流程
             MOBY_REFUND_DEPOSIT("MOBY_REFUND_DEPOSIT",          "订金退款"),
    //
    ;

    public final String topic;
    public final String desc;

    TopicEnum(String topic, String desc) {
        this.topic = topic;
        this.desc = desc;
    }

    public static TopicEnum getByTopic(String topic) {
        for (TopicEnum topicEnum : TopicEnum.values()) {
            if (topicEnum.topic.equals(topic))
                return topicEnum;
        }
        return null;
    }
}
